package cn.wolfcode.luowowo.article.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class WendaQuestionQuery extends QueryObject {
    private static final int TYPE_HOT= 0;// 查询热门数据
    private static final int TYPE_NEW = 1;// 查询最新数据
    private static final int TYPE_NO_ANSWER= 2;// 查询待回答的数据

    private int type=TYPE_HOT;
    // 是否热门
    private int ishot=-1;
    // 排序字段
    private String orderBy;
    // 是否是待回答
    private int isReply=-1;
    // 根据状态数据
    private int state=-1;
    public int getIshot() {
        ishot=type==TYPE_HOT?1:ishot;
        System.out.println("------ishot------"+ishot);
        return ishot;
    }
    public String getOrderBy() {
        orderBy=type==TYPE_NEW?"createtime":orderBy;
        return orderBy;
    }
    public int getIsReply() {
        isReply=type==TYPE_NO_ANSWER?1:isReply;
        return isReply;
    }
}
